<style type="text/css">
<!--
#pic_view {
	height: 200px;
	width: 300px;
}
<? if ($this->action=='insert') : ?>
#pic_view {
	display: none;
}
<? endif; ?>
-->
</style>
<form action="<?=$this->url ( array ('action' => $this->action ) )?>"
	method="post" enctype="multipart/form-data" style="width:300px; margin:auto">
  <dl>
    <dt><img src="/html/upfile/pic/<?=$this->row->src ?>" name="pic_view" id="pic_view" /></dt>
    <dt>权重:</dt>
    <dd>
      <?=$this->formText('order',$this->row->order, array ('style' => 'width:300px' )) ?>
    </dd>
    <dt>外部链接:</dt>
    <dd>
      <?=$this->formText('link',$this->row->link, array ('style' => 'width:300px' )) ?>
    </dd>
    <dt>上传:</dt>
    <dd>
      <?=$this->formFile ( 'pic', null, array ('style' => 'width:300px' ) )?>
    </dd>
    <dt>描述:</dt>
    <dd>
      <?=$this->formTextarea ( 'summary', $this->row->summary, array ('style' => 'width:300px;height:100px' ) )?>
    </dd>
    <dd>
      <?=$this->formSubmit ( 'bb', $this->action )?>
    </dd>
  </dl>
</form>
<script>
$(function(){
    $("#pic").change(function(){
        $("#pic_view").attr("src", $(this).val()).css("display", "inline");
    })
});
</script>
